#define CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void reserve(int* arr, int begain, int end)
{
	while (begain < end)
	{
		int tem = arr[begain];
		arr[begain] = arr[end];
		arr[end] = tem;
		begain++;
		end--;
	}
}
void xuanzn(int* arr,int sz,int k)
{

	reserve(arr, 0, k-1);
	reserve(arr+k, 0, sz-k-1);
	reserve(arr, 0, sz-1); 
}
int main()
{
	int arr[10] = { 1,2,3,4,5,6,7,8,9,10 };
	int i = 0;
	xuanzn(arr, 10, 4);
	for (i = 0; i < 10; i++)
	{
		printf("%d ",arr[i]);
	}
	printf("\n");
	return 0;
}